package com.dmpp.mes.service.impl;


import com.dmpp.mes.bean.ResponseData;
import com.dmpp.mes.dao.OrderMapper;
import com.dmpp.mes.dao.StockMapper;
import com.dmpp.mes.parameterInfo.Order;
import com.dmpp.mes.parameterInfo.Stock;
import com.dmpp.mes.service.OrderService;
import com.dmpp.mes.service.StockService;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service(value = "StockService")

public class StockServiceImpl implements StockService {

    @Autowired
    private StockMapper mapper;

    @Override
    public ResponseData findAll(Stock stock) {
        ResponseData responseData = new ResponseData();
        PageInfo pageInfo = new PageInfo<>(mapper.findAll(stock));
        responseData.setData(pageInfo);
        return responseData;
    }
}
